//流程模块【xmnbspymd.内部项目审批流程】下录入页面自定义js页面,初始函数 checktablediv
function initbodys(){
}
//小计
function showSubData_bak(){
	js.ajax(js.getajaxurl('getXmnbspList','index','cg'),{"mid":mid},function(s){
		var content = "<table width=\"100%\" class=\"createrows\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" style=\"border-collapse:collapse;\" >";
		content += "<tr><td class=\"ys1\"></td><td class=\"ys1\">编号</td><td class=\"ys1\">单位名称</td><td class=\"ys1\">申请采购项目名称</td><td class=\"ys1\">项目分类</td><td class=\"ys1\">产地</td><td class=\"ys1\">预算总价</td><td class=\"ys1\">资金性质</td><td class=\"ys1\">预算资金项目名称</td><td class=\"ys1\">明细科目</td><td class=\"ys1\">采购方式</td><td class=\"ys1\">代理单位</td><td class=\"ys1\">项目负责人</td><td class=\"ys1\">备注</td></tr>";
		//货物类表格
		var goodsTableContent = content;
		var goodsIndex = 0;
		//服务类表格
		var serviceTableContent = content;
		var serviceIndex = 0;
		//工程类表格
		var projectTableContent = content;
		var projectIndex = 0;
		
		$.each(s, function(i, field){
			if (field.type == "货物类") {
				goodsIndex++;
				goodsTableContent += "<tr>";
				goodsTableContent += "<td></td>";
				goodsTableContent += "<td>"+goodsIndex+"</td>";
				goodsTableContent += "<td>"+field.companyname+"</td>";
				goodsTableContent += "<td>"+field.name+"</td>";
				goodsTableContent += "<td>"+field.type+"</td>";
				goodsTableContent += "<td>"+field.producing_area+"</td>";
				goodsTableContent += "<td>"+field.budget+"</td>";
				goodsTableContent += "<td>"+field.funds_type+"</td>";
				goodsTableContent += "<td>"+field.budget_item_name+"</td>";
				goodsTableContent += "<td>"+field.detail+"</td>";
				goodsTableContent += "<td id=\"catalogue_input_"+field.id+"\">"+field.catalogue_input+"</td>";
				goodsTableContent += "<td>"+field.buymode_input+"</td>";
				goodsTableContent += "<td>"+field.proxycompany_input+"</td>";
				goodsTableContent += "<td>"+field.projectadminer_input+"</td>";
				goodsTableContent += "<td>"+field.note_input+"</td>";
				goodsTableContent += "</tr>";
			} else if (field.type == "服务类"){
				serviceIndex++;
				serviceTableContent += "<tr>";
				serviceTableContent += "<td></td>";
				serviceTableContent += "<td>"+serviceIndex+"</td>";
				serviceTableContent += "<td>"+field.companyname+"</td>";
				serviceTableContent += "<td>"+field.name+"</td>";
				serviceTableContent += "<td>"+field.type+"</td>";
				serviceTableContent += "<td>"+field.producing_area+"</td>";
				serviceTableContent += "<td>"+field.budget+"</td>";
				serviceTableContent += "<td>"+field.funds_type+"</td>";
				serviceTableContent += "<td>"+field.name+"</td>";
				serviceTableContent += "<td>"+field.detail+"</td>";
				serviceTableContent += "<td id=\"catalogue_input_"+field.id+"\">"+field.catalogue_input+"</td>";
				serviceTableContent += "<td>"+field.buymode_input+"</td>";
				serviceTableContent += "<td>"+field.proxycompany_input+"</td>";
				serviceTableContent += "<td>"+field.projectadminer_input+"</td>";
				serviceTableContent += "<td>"+field.note_input+"</td>";
				serviceTableContent += "</tr>";
			} else if (field.type == "工程类"){
				projectIndex++;
				projectTableContent += "<tr>";
				projectTableContent += "<td></td>";
				projectTableContent += "<td>"+projectIndex+"</td>";
				projectTableContent += "<td>"+field.companyname+"</td>";
				projectTableContent += "<td>"+field.name+"</td>";
				projectTableContent += "<td>"+field.type+"</td>";
				projectTableContent += "<td>"+field.producing_area+"</td>";
				projectTableContent += "<td>"+field.budget+"</td>";
				projectTableContent += "<td>"+field.funds_type+"</td>";
				projectTableContent += "<td>"+field.name+"</td>";
				projectTableContent += "<td>"+field.detail+"</td>";
				projectTableContent += "<td id=\"catalogue_input_"+field.id+"\">"+field.catalogue_input+"</td>";
				projectTableContent += "<td>"+field.buymode_input+"</td>";
				projectTableContent += "<td>"+field.proxycompany_input+"</td>";
				projectTableContent += "<td>"+field.projectadminer_input+"</td>";
				projectTableContent += "<td>"+field.note_input+"</td>";
				projectTableContent += "</tr>";
			}
		});
		
		var endContent = "</table>";
		goodsTableContent += endContent;
		serviceTableContent += endContent;
		projectTableContent += endContent;
		$("#goodsConid").html(goodsTableContent);
		$("#serviceConid").html(serviceTableContent);
		$("#supplyConid").html(projectTableContent);
	},'get,json',false,'');
}
